package org.example.rubbish.service;

import org.example.rubbish.common.PageResult;
import org.example.rubbish.entity.ForumPost;

import java.util.List;
import java.util.Map;

public interface ForumService {

    PageResult<ForumPost> getForumPosts(Integer page, Integer size, String title, String author, String status);

    ForumPost createForumPost(ForumPost forumPost);

    ForumPost updateForumPost(ForumPost forumPost);

    void deleteForumPost(Long id);

    void batchDeleteForumPosts(List<Long> ids);

    void updateForumPostStatus(Long id, String status);

    Object getForumStats();

    // 按行政区域获取帖子
    PageResult<ForumPost> getForumPosts(Integer page, Integer size, String title, String author,
                                        String status, String province, String city, String district);

    // 按矩形边界搜索帖子
    PageResult<ForumPost> searchPostsByBounds(Integer page, Integer size,
                                              Double swLat, Double swLng, // 西南角坐标
                                              Double neLat, Double neLng, // 东北角坐标
                                              String title, String author, String status);

    // 获取全国帖子分布统计
    Map<String, Object> getNationalPostDistribution();

    // 获取区域统计报表
    List<Map<String, Object>> getRegionStatsReport(String level);

    // 获取热力图数据
    List<Map<String, Object>> getForumHeatmapData(String status, String province, String city);
}